 <#include "/common/inc_more.html"/>
 <link rel="stylesheet" href="${baseUrl}/resources/ace/assets/css/ace.css" />
	<script src="${baseUrl}/resources/js/layer/layer.js"></script>
      	<script src="${baseUrl}/resources/js/jquery.ext.js"></script>
	<script src="${baseUrl}/resources/js/layer/extend/layer.ext.js"></script>
	<script src="${baseUrl}/resources/js/common.js"></script>
 	<div class="row" style="background-color:#f5f5f5;">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								<div class="space-6"></div>

								<div class="row">
									<div class="col-sm-10 col-sm-offset-1">
										<!-- #section:pages/invoice -->
										<div class="widget-box transparent">
											<div class="widget-header widget-header-large">
												<h3 class="widget-title grey lighter">
													<i class="ace-icon fa fa-leaf green"></i>
													订单详情
												</h3>
													<br />
													<span style="color:black;font-weight: bold;">订单状态:</span>
													<#if order.state="1">
													<span style="color:orange;font-weight: bold;">等待卖家发货</span>
													</#if>
													<#if order.state="2">
													<span style="font-weight: bold;color: #5bc0de;">快递运输中</span>
													</#if>
												<!-- #section:pages/invoice.info -->
												<div class="widget-toolbar no-border invoice-info">
													<span class="invoice-info-label">订单号:</span>
													<span class="red">${order.oid!}</span>

													<br />
													<span class="invoice-info-label">下单时间:</span>
													<span class="blue">${order.date!}</span>
												</div>

												<div class="widget-toolbar hidden-480">
													<a href="#">
														<i class="ace-icon fa fa-print"></i>
													</a>
												</div>

												<!-- /section:pages/invoice.info -->
											</div>

											<div class="widget-body">
												<div class="widget-main padding-24">
													<div class="row">
														<div class="col-sm-6">
															<div class="row">
																<div class="col-xs-11 label label-lg label-info arrowed-in arrowed-right">
																	<b>发货方</b>
																</div>
															</div>

															<div>
																<ul class="list-unstyled spaced">
																	<li>
																		<i class="ace-icon fa fa-caret-right blue"></i>发货地址:&nbsp;&nbsp;湖南省湘潭市雨湖区
																	</li>

																	<li>
																		<i class="ace-icon fa fa-caret-right blue"></i>邮编
																		<span>411100</span>
																	</li>

																	<li>
																		<i class="ace-icon fa fa-caret-right blue"></i>
联系电话:
																		<b class="red">12345678</b>
																	</li>

																	<li class="divider"></li>
																	<li>
																		<i class="ace-icon fa fa-caret-right blue"></i>
发货人:
																		<b class="red">dzq's BookShop</b>
																	</li>
																</ul>
															</div>
														</div><!-- /.col -->

														<div class="col-sm-6">
															<div class="row">
																<div class="col-xs-11 label label-lg label-success arrowed-in arrowed-right">
																	<b>收货方</b>
																</div>
															</div>

															<div>
																<ul class="list-unstyled  spaced">
																	<li>
																		<i class="ace-icon fa fa-caret-right green"></i>收货地址:&nbsp;&nbsp;${order.addressInfo.province!}省${order.addressInfo.city!}市${order.addressInfo.area!}区(县)${order.addressInfo.detail!} 
																	</li>

																	<li>
																		<i class="ace-icon fa fa-caret-right green"></i>邮编:&nbsp;&nbsp;${order.addressInfo.postcode!}
																	</li>

																	<li class="divider"></li>

																	<li>
																		<i class="ace-icon fa fa-caret-right blue"></i>
联系电话:
																		<b class="red">${order.addressInfo.tel!}</b>
																	</li>
																											<li>
																		<i class="ace-icon fa fa-caret-right blue"></i>
收货人:
																		<b class="red">${order.addressInfo.acceptusername!}</b>
																	</li>
																	
																</ul>
															</div>
														</div><!-- /.col -->
													</div><!-- /.row -->
													
													<div class="space"></div>

													<div>
														<table class="table table-striped table-bordered">
															<thead>
																<tr>
																	<th class="center">序号</th>
																	<th>商品信息</th>
																	<th class="hidden-xs">描述</th>
																	<th class="hidden-480">数量</th>
																	<th>小计</th>
																</tr>
															</thead>

															<tbody>
															<#list order.orderitems as orderitem>
																<tr>
																	<td class="center">${orderitem_index}</td>

																	<td>
																		<a href="#"><img alt="" height="100px;" width="100px;" src="${showImgUrl}${orderitem.book.image!}"><br/>${orderitem.book.bname!}</a>
																	</td>
																	<td class="hidden-xs">
																		${orderitem.book.blurb!}
																	</td>
																	<td class="hidden-480"> ${orderitem.count!}</td>
																	<td>${orderitem.subTotal!}元</td>
																</tr>
															</#list>
															</tbody>
														</table>
													</div>

													<div class="hr hr8 hr-double hr-dotted"></div>

													<div class="row">
														<div class="col-sm-5 pull-right">
															<h4 class="pull-right">
																总计 :
																<span class="red">${order.total!}元</span>
															</h4>
														</div>
													</div>
							<div class="hr hr-16 hr-dotted"></div>
							<#if order.state="1">
						<div style="text-align: center;">
							<button class="btn btn-info" type="button" onclick="sendgoods('${order.oid!}')">
								<i class="ace-icon fa fa-check bigger-110"></i>
								发货
							</button>
							&nbsp; &nbsp; &nbsp;
							<button class="btn" type="reset">
								<i class="ace-icon fa fa-undo bigger-110"></i>
								重置
							</button>
						</div>
						</#if>
												</div>
											</div>
										</div>
<script type="text/javascript">
function sendgoods(oid){
	$.post("${baseUrl}/order/edit",{oid:oid,state:'2'},function(data){
		 window.parent.alertMsg(data.msg.msgText,data.msg.msgStatus);
		 window.parent.query();
		$.close();
	});
}
</script>